#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project SIM7600CE-REST
@File    : sms_router.py
@Author  : Mr.Cai
@Date    : 2024/01/22 21:00
"""
import json
import random
import time
from typing import Union, Annotated, Optional, List

from fastapi import APIRouter, Header
from fastapi.encoders import jsonable_encoder

from app.types import request
from app.types import response
from app.utils import logger

router = APIRouter(
    prefix="/sms",
    tags=["sms接口"]
)


@router.get("/rest/sms/list")
async def list_by_state(state: int = 0, keywords: str = ''):
    """
    根据状态和关键字查询短信列表
    """
    dataList = [{
        "id": "1",
        "sender": "发件人",
        "recieve_time": "收件时间",
        "content": "短信内容"
    },{
        "id": "1",
        "sender": "发件人",
        "recieve_time": "收件时间",
        "content": "短信内容"
    },{
        "id": "1",
        "sender": "发件人",
        "recieve_time": "收件时间",
        "content": "短信内容"
    }]
    dataMap = {"code": 200, "msg": "操作成功", "data": dataList}
    return dataMap

